import Vue from 'vue'
import VueRouter from 'vue-router'

// import Login from '../components/login/Login.vue'
// import Homepath from '../components/home/Homepath.vue'
// import Home from '../components/home/Home.vue'
// import LoginByPC from '../components/loginByPC/LoginByPC.vue'
const Login = () => import(/* webpackChunkName: "login_loginbypc_home_homepath" */ '../components/login/Login.vue')
const Homepath = () => import(/* webpackChunkName: "login_loginbypc_home_homepath" */ '../components/home/Homepath.vue')
const Home = () => import(/* webpackChunkName: "login_loginbypc_home_homepath" */ '../components/home/Home.vue')
const LoginByPC = () => import(/* webpackChunkName: "login_loginbypc_home_homepath" */ '../components/loginByPC/LoginByPC.vue')

// import commodity from '../components/commodity/commodity.vue'
// import List from '../components/goods/List.vue'
// import Cart from '../components/cart/cart.vue'
// import goodsdesc from '../components/commodity/goodsdesc.vue'
// import goodsay from '../components/commodity/goodsay.vue'
const commodity = () => import(/* webpackChunkName: "commodity_goodsdesc_goodsay_list_cart" */ '../components/commodity/commodity.vue')
const goodsdesc = () => import(/* webpackChunkName: "commodity_goodsdesc_goodsay_list_cart" */ '../components/commodity/goodsdesc.vue')
const goodsay = () => import(/* webpackChunkName: "commodity_goodsdesc_goodsay_list_cart" */ '../components/commodity/goodsay.vue')
const List = () => import(/* webpackChunkName: "commodity_goodsdesc_goodsay_list_cart" */ '../components/goods/List.vue')
const Cart = () => import(/* webpackChunkName: "commodity_goodsdesc_goodsay_list_cart" */ '../components/cart/cart.vue')

// import NewsList from '../components/views/List.vue'
// import NewsDetail from '../components/views/Detail.vue'
const NewsList = () => import(/* webpackChunkName: "newslist_newsdetail" */ '../components/views/List.vue')
const NewsDetail = () => import(/* webpackChunkName: "newslist_newsdetail" */ '../components/views/Detail.vue')

// import Images from '../components/images/Images.vue'
// import ImagesDetali from '../components/images/ImagesDetali.vue'
const Images = () => import(/* webpackChunkName: "images_imagesdetali" */ '../components/images/Images.vue')
const ImagesDetali = () => import(/* webpackChunkName: "images_imagesdetali" */ '../components/images/ImagesDetali.vue')

// import Searcher from '../components/search/Search.vue'
// import Add from '../components/search/Add.vue'
const Searcher = () => import(/* webpackChunkName: "searcher_add" */ '../components/search/Search.vue')
const Add = () => import(/* webpackChunkName: "searcher_add" */ '../components/search/Add.vue')

const Map = () => import(/* webpackChunkName: "map_vip_order" */ '../components/map/Map.vue')
const Vip = () => import(/* webpackChunkName: "map_vip_order" */ '../components/vip/Vip.vue')
const Order = () => import(/* webpackChunkName: "map_vip_order" */ '../components/order/Order.vue')

// import Map from '../components/map/Map.vue'
// import Vip from '../components/vip/Vip.vue'
// import Order from '../components/order/Order.vue'
const classify = () => import(/* webpackChunkName: "classify_classify1" */ '../components/classify/classify.vue')
const classify1 = () => import(/* webpackChunkName: "classify_classify1" */ '../components/classify/classify1.vue')

// import classify from '../components/classify/classify.vue'
// import classify1 from '../components/classify/classify1.vue'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/loginbypc' },
  { path: '/login', component: Login },
  { path: '/map', component: Map },
  { path: '/loginbypc', component: LoginByPC },
  { path: '/classify', component: classify },
  { path: '/classify1', component: classify1 },
  {
    path: '/homepath',
    component: Homepath,
    children: [
      { path: '/home/', component: Home },
      { path: '/goods', component: commodity },
      { path: '/goods/getdesc/:id', component: goodsdesc },
      { path: '/goods/goodsay/:id', component: goodsay },
      { path: '/goods/list', component: List },
      { path: '/newslist', component: NewsList },
      { path: '/news/detail/:id', component: NewsDetail },
      { path: '/cart', component: Cart },
      { path: '/images', component: Images },
      { path: '/imagesDetali/:id', component: ImagesDetali },
      { path: '/vip', component: Vip },
      { path: '/search', component: Searcher },
      { path: '/add', component: Add },
      { path: '/order', component: Order }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
